package com.cleaningcloud.cld.mapper;

import java.util.List;
import com.cleaningcloud.cld.domain.CldWorkplanDetails;
import com.cleaningcloud.cld.domain.dto.CldWorkplanDetailsDto;
import com.cleaningcloud.cld.domain.vo.CldWorkplanDetailsVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

/**
 * 工作计划明细Mapper接口
 * 
 * @author cleaningcloud
 * @date 2024-11-21
 */
public interface CldWorkplanDetailsMapper 
{
    /**
     * 查询工作计划明细
     * 
     * @param workplanDetailsId 工作计划明细主键
     * @return 工作计划明细
     */
    CldWorkplanDetails selectCldWorkplanDetailsByWorkplanDetailsId(Long workplanDetailsId);

    /**
     * 查询工作计划明细
     *
     * @param workplanDetailsId 工作计划明细主键
     * @return 工作计划明细
     */
    CldWorkplanDetails getCldWorkplanDetailsByWorkplanDetailsId(Long workplanDetailsId);

    /**
     * 查询工作计划明细列表
     * 
     * @param cldWorkplanDetails 工作计划明细
     * @return 工作计划明细集合
     */
    List<CldWorkplanDetailsVo> selectCldWorkplanDetailsList(CldWorkplanDetailsDto cldWorkplanDetails);


    /**
     * 查询工作计划明细列表
     *
     * @param workPlanId 工作计划明细
     * @return 工作计划明细集合
     */
    List<CldWorkplanDetailsVo> getCldWorkplanDetailsList(@Param("workPlanId") Long workPlanId);

    /**
     * 新增工作计划明细
     * 
     * @param cldWorkplanDetails 工作计划明细
     * @return 结果
     */
    int insertCldWorkplanDetails(CldWorkplanDetails cldWorkplanDetails);

    /**
     * 修改工作计划明细
     * 
     * @param cldWorkplanDetails 工作计划明细
     * @return 结果
     */
    int updateCldWorkplanDetails(CldWorkplanDetails cldWorkplanDetails);

    /**
     * 删除工作计划明细
     * 
     * @param workplanDetailsId 工作计划明细主键
     * @return 结果
     */
    int deleteCldWorkplanDetailsByWorkplanDetailsId(Long workplanDetailsId);

    /**
     * 批量删除工作计划明细
     * 
     * @param workplanDetailsIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteCldWorkplanDetailsByWorkplanDetailsIds(Long[] workplanDetailsIds);

    /**
     * 批量新增工作计划明细
     * @param list
     */
    void batchInsertWorkplanDetailsDetails(List<CldWorkplanDetailsDto> list);

    /**
     * 根据工作计划id批量删除
     * @param workplanId
     */
    @Delete("delete from cld_workplan_details where workplan_id =#{workplanId}")
    void deleteByWorkplanId(@Param("workplanId") Long workplanId);
}
